import pandas as pd
import numpy as py
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans

df = pd.read_csv('employee_data.csv')
left_data = df[['satisfaction_level', 'last_evaluation']][df.left == 1]
kmeans = KMeans(n_clusters=3).fit(left_data)
left_data['label'] = kmeans.labels_
print(left_data)
plt.scatter(left_data['satisfaction_level'],
            left_data['last_evaluation'],
            c= left_data['label'])
plt.xlabel('satisfaction_level')
plt.ylabel('last_evaluation')
plt.show()